package com.java.pojo;

import lombok.Data;

import java.math.BigDecimal;
import java.sql.Date;

/**
 * @ClassName Person
 * @Description 人
 */
@Data
public class Person {
    // 测试获取共有成员变量
    public String publicName;
    /**
     * id
     */
    private Integer id;

    /**
     * 姓名
     */
    private String name;

    /**
     * 年龄
     */
    private Integer age;

    /**
     * 性别
     */
    private String sex;

    /**
     * 账户
     */
    private BigDecimal account;

    static{
        System.out.println("static 静态方法~~");
    }

    {
        System.out.println("无名方法~~");
    }

    public Person() {
        System.out.println("无参构造方法······");
    }

    public Person(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public Person(int id, String name, String sex, int age, BigDecimal account) {
        this.id = id;
        this.name = name;
        this.sex = sex;
        this.age = age;
        this.account = account;
    }

    public void eat(String food){
        System.out.println("吃" + food );
    }

    public void eat(){
        System.out.println("喝西北风呐~~" );
    }
}
